Skip to content

Upgrade trezor-connect-rs to 0.4.0#120

Merged
coreyphillips merged 2 commits into
masterfrom
chore/trezor-connect-rs-0.4.0
Jul 15, 2026
Merged

Upgrade trezor-connect-rs to 0.4.0#120
coreyphillips merged 2 commits into
masterfrom
chore/trezor-connect-rs-0.4.0

Conversation

@coreyphillips

Copy link
Copy Markdown
Collaborator

Summary

Upgrades trezor-connect-rs from 0.3.3 to 0.4.0 (release notes).

0.4.0 closes gaps against the JS upstream (@trezor/connect) and was verified end-to-end on a Trezor Safe 7 over USB:

  • client-side validation before signing (dust limit, prev-tx presence and hash verification, address parsing/network checks)
  • post-sign verification: the device-returned transaction is cross-checked against the request (counts, amounts, output scripts), and txid is now computed locally
  • get_address hardening: silent pre-derive with expected-address check, multisig/chunkify forwarded, mac surfaced
  • USB THP pairing credentials are stored and reused, so Safe devices over USB pair once instead of on every process run; busy handshakes retry with backoff

Changes in this repo

  • Bump both target-specific trezor-connect-rs requirements to 0.4.0
  • The From impls for GetAddressParams, SignMessageParams, VerifyMessageParams and SignTxParams now use struct-update syntax (..Default::default()), covering the new optional fields (chunkify, expected address) and dropping the deprecated ignored push field, so future additive fields will not break the build
  • Test fixture updated for the new SignedTxResponse.witnesses field

Behavior note for app layers

0.4.0 no longer silently defaults unset input sequences to 0xFFFFFFFD (RBF); the field is omitted so firmware applies its 0xFFFFFFFF (final) default, matching @trezor/connect. bitkit-core passes the caller's sequence through unchanged, so apps that want RBF must set sequence = 0xFFFFFFFD explicitly when building inputs.

Test plan

  • cargo build clean, no deprecation warnings
  • trezor module tests: 60 passed, 0 failed
  • Full suite: only the pre-existing blocktank staging-API network tests fail (api.stag.blocktank.to unreachable), unrelated to this change

Adapts to the 0.4.0 API: new optional fields on GetAddressParams,
SignMessageParams, VerifyMessageParams and SignedTxResponse are
covered with struct-update syntax so future additive fields do not
break the build, and the deprecated (ignored) push field is no longer
set. Note: 0.4.0 no longer defaults unset input sequences to RBF;
bitkit-core passes the caller's sequence through unchanged, so callers
wanting RBF must set 0xFFFFFFFD explicitly.
…t-rs-0.4.0

# Conflicts:
#	Cargo.lock
#	Cargo.toml
@coreyphillips

coreyphillips commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

Once approved, I will bump the versions, bindings and create a PR containing the changes for the iOS & Android apps accordingly.

@coreyphillips coreyphillips self-assigned this Jul 6, 2026

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented on Android and iOS

@coreyphillips coreyphillips merged commit 9b71e93 into master Jul 15, 2026
@coreyphillips coreyphillips deleted the chore/trezor-connect-rs-0.4.0 branch July 15, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants